package com.cn.xiaonuo.tcrfinance.tcragents.controller;

import com.cn.xiaonuo.common.entity.BusinessMessage;
import com.cn.xiaonuo.tcrfinance.tcragents.entiy.*;
import com.cn.xiaonuo.tcrfinance.tcragents.service.GzFinanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ＹｕＨａｏ·ｐｅｎｇ
 * @date 2022年01月25日 14:41
 */
@CrossOrigin
@RestController
public class GzFinanceController {

    @Autowired
    GzFinanceService gzFinanceService;

    @PostMapping("/api/gzAgent/finance/financialClosing")
    public BusinessMessage financialClosing(GzAgentRoyalty roy){
        return gzFinanceService.financialClosing(roy);
    }

    @PostMapping("/api/gzAgent/finance/financialRoyDetails")
    public BusinessMessage financialRoyDetails(GzAgentRoyalty roy){
        return gzFinanceService.financialRoyDetails(roy);
    }


    @PostMapping("/api/gzAgent/finance/financialSureRoy")
    public BusinessMessage financialSureRoy(@RequestBody List<GzAgentRoyalty> royList){
        return  gzFinanceService.financialSureRoy(royList);
    }

    @PostMapping("/api/gzAgent/finance/financialTolRoy")
    public BusinessMessage financialTolRoy(GzAgentRoyalty roy){
        return gzFinanceService.financialTolRoy(roy);
    }

    @PostMapping("/api/gzAgent/finance/financialDetailsRoy")
    public BusinessMessage financialDetailsRoy(GzAgentRoyalty roy){ return gzFinanceService.financialDetailsRoy(roy); }




    @PostMapping("/api/gzAgent/finance/financialCycles")
    public BusinessMessage financialCycles(AppsCyc appsCyc){
        return gzFinanceService.financialCycles(appsCyc);
    }

    @PostMapping("/api/gzAgent/finance/financialOpCycTrade")
    public BusinessMessage financialOpCycTrade(SlShop appsCyc){return gzFinanceService.financialOpCycTrade(appsCyc);}



    @PostMapping("/api/gzAgent/finance/financialSpRoyTolGb")
    public BusinessMessage financialSpRoyTolGb(AppsCyc appsCyc){return gzFinanceService.financialSpRoyTolGb(appsCyc);}


    @PostMapping("/api/gzAgent/finance/financialAgentTotalInfo")
    public BusinessMessage financialAgentTotalInfo(CycleInfo cInfo){return gzFinanceService.financialAgentTotalInfo(cInfo);}

    @PostMapping("/api/gzAgent/finance/financialHasRoyAgentInfo")
    public BusinessMessage financialHasRoyAgentInfo(RoyCycInfo cInfo){return gzFinanceService.financialHasRoyAgentInfo(cInfo);}

    @PostMapping("/api/gzAgent/finance/financialCycRoyDetails")
    public BusinessMessage financialCycRoyDetails(RoyDetailInfo cInfo){return gzFinanceService.financialCycRoyDetails(cInfo);}

}


